<template>
  <div id="scroll-list">
    <div v-for="(item,index) in topics" :key="index" style="margin-bottom: 2vh">
      <div id="user-info">
        <div id="avatar">
          <img :src="item.userInfo.headimgurl"/>
        </div>
        <div style="padding-left: 4vw;width: 40vh">
          <div id="nickname">
            {{ item.userInfo.nickname }}
          </div>
          <div id="level">
            1级
          </div>
        </div>
      </div>
      <div id="content">
        <span>#{{ item.topic.subjectName }}#</span>
        {{ item.topic.content }}
      </div>
      <div id="comment-wrapper">
        <img :src="comment_selected_img" @click="createComment('topic',item.topic)"/><span>评论</span>
      </div>
      <div id="line"></div>
    </div>
  </div>
</template>

<script>
import comment_default_img from '@/assets/comment_default.svg'
import comment_selected_img from '@/assets/comment_selected.svg'
import EventBus from "@/plugins/bus";

export default {
  name: "CommentList",
  data() {
    return {
      comments: []
    }
  }, mounted() {

  }, methods: {
  }
}
</script>

<style scoped>
</style>